package com.liveinstars.api.im;

import com.liveinstars.api.im.vo.RecommendFriendVO;
import com.onepiece.shipelves.common.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author: zhouze
 * @date: 2020/3/6
 */
@FeignClient("im")
public interface RecommendFriendApi {

    /**
     * 添加推荐好友
     * @param userId
     */
    @PostMapping("/addRecommendFriend")
    Result add(@RequestParam("user_id") Long userId);

    /**
     * 获取所有推荐好友
     * @return
     */
    @PostMapping("/listRecommendFriend")
    Result<List<RecommendFriendVO>> listAll();

    /**
     *
     * @param id
     * @param sort
     */
    @PostMapping("/updateRecommendFriendSort")
    Result updateSortById(@RequestParam("id")Long id, @RequestParam("sort")Integer sort);

    /**
     * 根据id删除推荐好友
     * @param id
     */
    @PostMapping("/deleteRecommendFriendById")
    Result deleteById(@RequestParam("id")Long id);
}
